package com.heima.behavior.controller;

import com.heima.behavior.service.ApCollectionBehaviorService;
import com.heima.model.behavior.dtos.CollectionBehaviorDTO;
import com.heima.model.common.dtos.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@Api(tags = "app端首收藏", value = "app端收藏")
@RestController
@RequestMapping("/api/v1")
public class ApCollectionBehaviorController {
    @Autowired
    ApCollectionBehaviorService apCollectionBehaviorService;

    @ApiOperation(value = "收藏")
    @PostMapping("/collection_behavior/")
    public ResponseResult findByUserIdOrEquipmentId(@RequestBody CollectionBehaviorDTO dto) {
        return apCollectionBehaviorService.collectBehavior(dto);
    }
}

